A trusted execution environment (TEE) is a secure and trusted zone in a processor, and can guarantee security, confidentiality, and integrity of code and data stored in it. The TEE provides an isolated execution environment. The code and data can run in this trusted zone, and it can be ensured that calculation is not interfered by a conventional operating system during a running process. As such, the confidentiality and integrity of the code and data can be guaranteed. The TEE (EAL2 +) provides a higher level of security compared with a conventional operating system, and provides more functions and better performance compared with SE (EAL5). The TEE has multiple implementations, such as Intel SGX, AMD SEV, ARM TrustZone (trusted zone), etc. Because the TEE provides an isolated execution environment, communication between a non-TEE and the TEE is generally called through a special instruction, such as SMC call (TrustZone) or ECall/OCall (SGX). For example, during log printing performed on a TEE side by calling an OCall function, after a CPU is switched from the TEE side to a non-TEE side and context information such as registers are restored, waiting for the log printing to complete on the non-TEE side is generally needed before returning to the TEE side and certain performance losses are caused.
Therefore, a more effective solution for data transmission in a TEE system is needed.